import { createRouter, createWebHistory } from 'vue-router'
import Index from '@/views/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index,

      redirect: '/management',
      children: [
        {
          path: '/management',
          name: 'management',
          component: () => import('@/views/ArticleManagementPage.vue')
        },
        {
          path: '/publish',
          name: 'publish',
          component: () => import('@/views/ArticlePublishPage.vue')
        }
      ]
    }
  ]
})

export default router
